<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // Set是一个数据集合，跟数组不一样，不会将重复的项加入，是一个唯一集合
        // const people = new Set();
        // people.add('Wes');
        // people.add('杨执信');
        // people.add('吴亦凡');
        // people.add('杨执信');
        // for (person of people) {
        //     console.log(person);
        // }
        // const students = new Set(["刘钰", "欧阳斐", "张先明"])
        // for (name of students) {
        //     console.log(students);
        // }


        //一个数组里的东西不用下标，怎么把下标的值解出来？
        //es6 解构
        const dogs = new Map();
        dogs.set("Snickers", 3);
        dogs.set("Sunny", 2);
        dogs.set("Hugo", 10);
        for (name in dogs) {
            console.log(dogs[value]);
        }
    </script>
</body>

</html>